const express = require('express')
const router = express.Router()

router.get('/:deviceSerial/captures', async (req, res) => {
  try {
    // 返回模拟数据
    const captures = [
      {
        id: 1,
        deviceSerial: req.params.deviceSerial,
        picUrl: 'https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/25.png', // 使用 GitHub 上的静态图片
        captureTime: new Date().toISOString(),
        channelNo: 1,
        quality: 1
      }
    ];
    
    res.json(captures);
  } catch (error) {
    console.error('获取抓拍记录失败:', error);
    res.status(500).json({ message: '获取抓拍记录失败' });
  }
});

module.exports = router; 